package com.brillilab.dao.mapper.method;

import java.util.List;

import com.brillilab.domain.vo.method.RecommendMethodTypeVo;
import com.brillilab.domain.vo.method.ReferExportCountVo;

import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.brillilab.domain.po.method.MethodType;

public interface MethodTypeMapper extends BaseMapper<MethodType> {
	
	/**
	 * 获取三级分类
	 * @param labId
	 * @param userId
	 * @param isOwn 是否查询自己
	 * @return
	 */
	List<MethodType> getThirdTypeList(@Param("labId")Long labId, @Param("userId")Long userId, @Param("isOwn") int isOwn);

	/**
	 * 批量更新
	 * @author WuMenghao
	 * @param 	thirdTypes
	 * @return
	 */
	Integer updateBatch(@Param("types") List<MethodType> thirdTypes);

    /**
     * 查询推荐方法类型列表
     * @author WuMenghao
     * @param userId
     * @return
     */
    List<RecommendMethodTypeVo> selectRecommendThirdMethodVo(Long userId);

	/**
	 * 查询所有的一级类型
	 */
	List<MethodType> selectAllFirstMethodType();

	List<MethodType> listRecommendMethodThirdType(@Param("labId") Long labId,@Param("level") Integer level);

	List<MethodType> selectListByLevelAndParentIdAndUserId(@Param("level") Integer level,@Param("parentId") Long parentId,@Param("userId") Long userId);

    List<String> selectAllThirdMethodPrefix(@Param("secondTypeId") Long secondTypeId,@Param("userId") Long userId);

	int deleteByMethodTypeIds(@Param("methodTypeIds") List<Long> methodTypeIds,@Param("userId") Long userId);

    List<MethodType> selectFreqUseThirdMethod(@Param("userId") Long userId);

    List<MethodType> selectTopFreqUseThirdMethod(@Param("userId")Long userId);
}
